<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../head.jsp"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- 让页面中可以使用相对路径，添加此标签 -->
<base href="<%=basePath%>">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>博客标题展示</title>
</head>
<body>
	<a href="/blog/form">新增</a>
	<table border="1px">
		<thead>
			<tr>
				<th>序号</th>
				<th>标题</th>
				<th>发布时间</th>
				<th>操作</th>
			</tr>
		</thead>
		<c:forEach items="${blogs }" var="blog" varStatus="status">
			<tr>
				<td>${status.index+1 }</td>
			</tr>
			<tr>
				<td>${blog.title }</td>
			</tr>
			<tr>
				<td>${ blog.publishTime}</td>
			</tr>
			<tr>
				<td><a href="/blog/form?id=${blog.id }">编辑</a><span> </span> <a
					href="/blog/delete?id=${blog.id }">删除</a></td>
			</tr>

		</c:forEach>

	</table>
</body>
</html>